package com.dycong.common.reflect.aop.annotation.After;

import com.dycong.common.reflect.aop.Greeting;
import org.springframework.stereotype.Component;

@Component
    public class GreetingImplAfter implements Greeting {

    @After
    @AfterThrowing
    @AfterReturning
    @Override
    public void sayHello(String name) {
        System.out.println("Hello! " + name);
    }

    @After
    @AfterThrowing
    @AfterReturning
    @Override
    public void sayLove(String name,String location){
        System.out.println("I love " + name+" in "+location);
    }

    public static void main(String[] args) {
        GreetingImplAfter after = new GreetingImplAfter();
        after.sayHello("hello");
    }
}
